package com.example.websocket.excel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import com.example.websocket.excel.ChineseCharToEnUtil.*;

public class Goods extends BaseRowModel {

    public static ChineseCharToEnUtil cte = new ChineseCharToEnUtil();

    @ExcelProperty(index = 11)
    private String number;

    @ExcelProperty(index = 12)
    private String name;

    @ExcelProperty(index = 13)
    private String abbr;

    @ExcelProperty(index = 14)
    private String ext;

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAbbr() {
        return abbr;
    }

    public void setAbbr(String abbr) {
        this.abbr = abbr;
    }

    public String getExt() {
        return ext;
    }

    public void setExt(String ext) {
        this.ext = ext;
    }

    @Override
    public String toString() {
        return  "(\"number\":\"" + number + '\"' +
                ",\"name\":\"" + name + '\"' +
                ",\"abbr_code\":\"" + cte.getAllFirstLetter(name) + '\"' +
                ",\"abbr\":\"" + abbr + '\"' +
                ",\"ext\":\"" + ext + "\")";
    }
}
